package com.breakfast.fun.data.entity.home.product;

import com.breakfast.fun.data.entity.user.order.Reply;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by yukai on 16/9/29.
 */

public class ProductCommentData {
    private int id;
    private String accountMobile;
    private String content;
    private double ave;
    private String commentType;
    private String addTime;
    private int isReply;
    /**
     * id : 692
     * commentId : 2618
     * content : 谢谢您对早范的支持，您可以通过添加客服微信号（客服微信号：zaofanzaocan）有什么需要都可以告诉我们的客服。早范，不仅关心您的早餐，更关心您的健康^O^
     * <p>
     * addTime : 2016-09-21 11:22:40
     */

    private Reply reply;
    private String nickName;
    private String userPhoto;

    public static ProductCommentData objectFromData(String str) {

        return new Gson().fromJson(str, ProductCommentData.class);
    }

    public static List<ProductCommentData> arrayDataBeanFromData(String str) {

        Type listType = new TypeToken<ArrayList<ProductCommentData>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getAccountMobile() {
        return accountMobile;
    }

    public void setAccountMobile(String accountMobile) {
        this.accountMobile = accountMobile;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public double getAve() {
        return ave;
    }

    public void setAve(double ave) {
        this.ave = ave;
    }

    public String getCommentType() {
        return commentType;
    }

    public void setCommentType(String commentType) {
        this.commentType = commentType;
    }

    public String getAddTime() {
        return addTime;
    }

    public void setAddTime(String addTime) {
        this.addTime = addTime;
    }

    public int getIsReply() {
        return isReply;
    }

    public void setIsReply(int isReply) {
        this.isReply = isReply;
    }

    public Reply getReply() {
        return reply;
    }

    public void setReply(Reply reply) {
        this.reply = reply;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getUserPhoto() {
        return userPhoto;
    }

    public void setUserPhoto(String userPhoto) {
        this.userPhoto = userPhoto;
    }
}
